package cn.secby.orders.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.*;
import cn.secby.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import cn.secby.common.core.web.domain.BaseEntity;

/**
 * 订单退货对象 tb_return_order
 * @author shenkunlin
 * @date 2025-05-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "tb_return_order")
public class ReturnOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value ="id" ,type = IdType.ASSIGN_ID )
    @JsonSerialize(using=ToStringSerializer.class)
    private Long id;

    /** 订单ID */
    @Excel(name = "订单ID")
    @TableField(value = "order_id")
    private Long orderId;

    /** 退货类型 */
    @Excel(name = "退货类型")
    @TableField(value = "return_type")
    private Integer returnType;

    /** 退货状态 */
    @Excel(name = "退货状态")
    @TableField(value = "return_status")
    private Integer returnStatus;

    /** 应退金额 */
    @Excel(name = "应退金额")
    @TableField(value = "return_amount")
    private Long returnAmount;

    /** 实退金额 */
    @Excel(name = "实退金额")
    @TableField(value = "actual_return_amount")
    private Long actualReturnAmount;

    /** 退货原因 */
    @Excel(name = "退货原因")
    @TableField(value = "return_reason")
    private String returnReason;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "完成时间", width = 40, dateFormat = "yyyy-MM-dd")
    @TableField(value = "completed_time")
    private Date completedTime;

    /** 来源 */
    @Excel(name = "来源")
    @TableField(value = "spu_source")
    private Integer spuSource;

    /** 是否删除  1 未删除  2 已删除 */
    @Excel(name = "是否删除  1 未删除  2 已删除")
    @TableField(value = "is_delete")
    @TableLogic(value = "1", delval = "2")
    private Integer isDelete;

}
